package com.wy.model;

import javax.persistence.Column;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.validation.constraints.NotBlank;

import com.wy.annotation.Sort;
import com.wy.base.AbstractPager;
import com.wy.valid.ValidEdit;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.ToString;

/**
 * @author ParadiseWY
 * @date 2019-08-20 15:30:50
 */
@ApiModel("科室表")
@Getter
@Setter
@NoArgsConstructor
@AllArgsConstructor
@ToString
@Builder
@Table(name = "ti_depart")
public class Depart extends AbstractPager {

	private static final long serialVersionUID = 1L;

	@ApiModelProperty("部门编号")
	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	@NotBlank(groups = ValidEdit.class)
	private String DepartmentID;

	@ApiModelProperty("部门名称")
	@Column
	@NotBlank
	private String DepartName;

	@ApiModelProperty("所属组织机构")
	@Column
	@NotBlank
	private String OrganizationID;

	@ApiModelProperty("上级部门")
	@Column
	@NotBlank
	private String ParentID;

	@ApiModelProperty("排序")
	@Column
	@Sort(hump2Snake = false)
	private Integer SortIndex;
}